<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
	<title>FORM Text</title>
	<link rel="stylesheet" id="templatecss" type="text/css" href="static/css/basic-grey.css">
</head>
<body>
	<form action="" method="post" class="basic-grey">
		<h1>您好,欢迎来到留言板
			<span>请把对应的信息都填上</span>
		</h1>
		<label>
			<span>姓名 :</span>
			<input id="name" type="text" name="name" placeholder="请填写您的真实姓名" />
		</label>
		<label>
			<span>邮箱 :</span>
			<input id="email" type="email" name="email" placeholder="填写您的正确邮箱" />
		</label>

		<label>
			<span>内容 :</span>
			<textarea id="message" name="message" placeholder="填写您的留言内容"></textarea>
		</label>
		<label>
			<span>类型 :</span><select name="selection">
				<option value="suggest">建议</option>
				<option value="complaint">投诉</option>
			</select>
		</label>
		<label>
			<span>&nbsp;</span>
			<input type="submit" class="button" value="提交" />
		</label>
	</form>
    <div class="basic-grey01">
         <table border="1" width="700">
         <tr>
             <td width="40">用户id</td>
             <td width="40">用户名</td>
             <td width="40">邮箱</td>
             <td width="40">内容</td>
             <td width="80">留言时间</td>
             <td width="80">修改时间</td>
         </tr>
         {% for i in messageboard %}
                 <tr>
                     <td>{{ i.id }}</td>
                     <td>{{ i.user_name }}</td>
                     <td>{{ i.email }}</td>
                     <td>{{ i.content }}</td>
                     <td>{{ i.ctime }}</td>
                     <td>{{ i.utime }}</td>
                 </tr>


    {% endfor %}
         </table>

    </div>
	<script>
		function changeStyle() {
	   var template = document.getElementById("template");
     var index = template.selectedIndex;
	   var templatevalue = template.options[index].value;
	   var templatecss = document.getElementById("templatecss");
	   templatecss.setAttribute("href","css/" + templatevalue + ".css");
	   document.getElementsByTagName("form")[0].setAttribute("class",templatevalue);
	 }
	</script>
</body>
</html>